package com.lotus.lqmp.service.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lotus.lqmp.base.biz.bean.PageQuery;
import com.lotus.lqmp.service.biz.BizModifyRecordBizService;
import com.lotus.lqmp.service.controller.vo.req.BizModifyRecordQueryReq;
import com.lotus.lqmp.service.controller.vo.resp.BizModifyRecordQueryResp;
import com.lotus.platform.common.model.base.BaseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 交付物变更记录表Controller
 * @author Shiheng.Liu1
 * @date 2022-03-29
 */
@RestController
@RequestMapping("/api/biz-modify-record")
@Api(tags = "记录变更相关")
public class BizModifyRecordController {
    @Autowired
    private BizModifyRecordBizService bizModifyRecordBizService;

    /**
     * 分页查询
     * @param queryInfo 分页查询条件
     * @return 分页结果
     */
    @PostMapping("/page")
    @ApiOperation("变更记录分页查询")
    public BaseResult<Page<BizModifyRecordQueryResp>> queryForPage(
        @RequestBody @Valid PageQuery<BizModifyRecordQueryReq> queryInfo) {
        return BaseResult.ok(bizModifyRecordBizService.queryForPage(queryInfo));
    }

}
